package cn.vconinfo.lims.delivery.controller;

import cn.vconinfo.lims.delivery.entity.SpecimenCheckAndProjectDocumentIdsDTO;
import cn.vconinfo.lims.delivery.entity.TableResponseDTO;
import cn.vconinfo.lims.delivery.service.RequestTestItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/test")
public class ReqeustInfoController {

    @Autowired
    private RequestTestItemService requestTestItemService;

    @ResponseBody
    @PostMapping(value = "/request")
    public TableResponseDTO addRequestInfo(@RequestBody SpecimenCheckAndProjectDocumentIdsDTO projectDocumentIdsDTO){
        return requestTestItemService.addRequestAndAddProjectDocuments(projectDocumentIdsDTO);
    }

}
